
#include "gsssettingsdlg.h"
#include <QSettings>

GSSSettingsDlg::GSSSettingsDlg(QWidget *parent)
 : QWidget(parent)
{
	ui.setupUi(this);
	connect(ui.btnApply,SIGNAL(clicked()),this,SLOT(apply()));
			
}


GSSSettingsDlg::~GSSSettingsDlg()
{
}




/*!
    \fn GSSSettingsDlg::apply()
 */
void GSSSettingsDlg::apply()
{
	QSettings settings("../../gss.conf",QSettings::IniFormat);
	settings.beginGroup("hosts");
	settings.setValue("HPSC_IP",ui.txtHpscIP->text()); 
	settings.setValue("HPSC_Port",ui.txtHpscPort->text());
	settings.endGroup();
	settings.beginGroup("Serial_Ports");
	settings.setValue("HPSC",ui.txtHpscSerial->text());
	settings.endGroup();
}


/*!
    \fn GSSSettingsDlg::readSettings()
 */
void GSSSettingsDlg::readSettings()
{
    /// @todo implement me
}
